package com.spddr.pmos.cxf;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import com.spddr.pmos.jpa.Line;
import com.spddr.pmos.jpa.Substation;

import cn.seqdata.cxf.repos.JaxrsObjectRepository;

@Path("/substation")
public interface JaxrsSubstation extends JaxrsObjectRepository<Substation> {
	@PUT
	@Path("/")
	default <S extends Substation> S save(S entity) {
		return getRepository().save(entity);
	}

	@GET
	@Path("/{id}/lines")
	List<Line> lines(@PathParam("id") long id);
}
